﻿using System;
using System.Collections.Generic;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using eCommMongo.Core.Domain.Customers;
using eCommMongo.Core.Domain.Products;

namespace eCommMongo.Core.Domain.Posts
{
    public class Post : BaseMongoEntity
    {

       [BsonDateTimeOptions(Representation = BsonType.Document)]
        public virtual DateTime CreatedAt { get; set; }
        public virtual string Text { get; set; }

        [MongoReference]
        public virtual Customer Customer { get; set; }
        public virtual bool Deleted { get; set; }

        [MongoReference]
        public virtual Product Product { get; set; }
        public virtual bool IsProduct { get; set; }
        public virtual int Point { get; set; }


        public virtual IList<Comment> Comments { get; set; }

        [MongoReference]
        public virtual ICollection<PostPicture> PostPictures { get; set; }

        [MongoReference]
        public IList<StatusTag> Tags{ get; set; }

        public string CreatedAtStr { get; set; }
    }
}
